1. Field of the Invention
The present invention relates to a compressing method and device, an expanding method and device, a compressing and expanding system, and a recording medium and particularly concerns a method of compressing and expanding a continuous analog signal or digital signal.
2. Description of the Related Art
Conventionally, when transmitting and storing a signal such as a picture signal and an aural signal that has a large amount of information, a signal has been compressed and expanded in order to reduce an amount of transmitted information, increase a storing time of a storage medium, and so on. Generally, when an analog signal is compressed, an analog signal is initially sampled according to a predetermined sampling frequency and is digitized, and compression is performed on the obtained digital data.
For example, in the case of compression on a picture signal and an aural signal, a method is used in which compression is performed on a frequency region after original data is processed using a conversion filter on a time base-frequency axis such as DCT (Discrete-Cosine-Transform). DPCM (Differential Pulse Code Modulation), which is frequently used as a method of compressing an aural signal for a telephone line, is used with the same intention. Additionally, the DPCM compression is a method for coding a differential of adjacent sample values when a waveform is sampled.
Further, as a method for performing time/frequency conversion, a method using a sub-band filter and MDCT (Modified Discrete Cosine Transform) is also available. As a coding method using such a method, MPEG (Moving Picture Image Coding Experts Group) audio is applicable.
Further, the most widely used picture compressing system is generally known as the MPEG standard.
Data compressed by the above compressing method is basically expanded according to reversed operations of the same compressing method.
Namely, after compressed digital data is converted from a signal of a frequency region to a signal of a time region by frequency/time conversion, predetermined expanding operations are carried out to reproduce original digital data. And then, the original data obtained thus is subjected to digital-analog conversion if necessary and is outputted as an analog signal.
However, in the above conventional compressing and expanding method, a signal on a time base is converted to a signal on a frequency axis before compression. Hence, operations such as time/frequency conversion for compression and frequency/time conversion for expansion are necessary. Therefore, the operations are complicated and the configuration for realizing the operations becomes extremely complicated. This problem has caused not only a longer processing time for compression and expansion but also difficulty in achieving a smaller device.
Moreover, generally in the case of compression and expansion of data, it is important to consider how to improve the quality of reproduced data while improving its compressibility. However, in the above conventional compressing and expanding method, when a compressibility of a picture signal and an aural signal is increased, an image and voice reproduced by expanding compressed data are degraded in quality. In contrast, when importance is placed on the quality of a reproduced image and reproduced voice, a picture signal and an aural signal decrease in compressibility. Therefore, it has been extremely difficult to achieve both of an increased compressibility and improved quality of reproduced data.
The present invention is devised to solve the above problems and aims to simplify the compressing and expanding operations for a signal so as to shorten a processing time and to simplify the configuration for realizing the operations.
Also, another object of the present invention is to provide a new compressing and expanding method for realizing both of an increased compressibility and improved quality of reproduced data.
In order to solve the above problems, on a compression side of the present invention, signed digital data to be compressed is converted to unsigned digital data by adding an offset value to the signed digital data, a rounding operation of a lower-order bit is performed on the unsigned digital data, and then, the digital data undergoing the rounding operation is sampled at a time interval of a point where a differential value varies in polarity. Thus, a pair of a discrete amplitude data value on each sample point and a timing data value indicative of a time interval between sample points is obtained as compressed data.
Further, on an expansion side, after an amplitude data value included in the compressed data is multiplied by the number of bits rounded on the compression side, interpolation data for interpolating amplitude data having a time interval indicated by the timing data is obtained by using an amplitude data value obtained thus and a timing data value included in the compressed data, and an offset value equal to that of the compression side is subtracted from the interpolation data so as to obtain expanded data.
In another embodiment of the present invention, on a compression side, unsigned digital data generated by adding the offset value is subjected to the rounding operation after a data value is changed by performing a different operation for each value, and on an expansion side, amplitude data generated by the multiplying operation is subjected to the operation for generating the interpolation data after a data value is changed by performing a different operation for each value.
In another embodiment of the present embodiment, when a time interval between the sample points exceeds a value represented by the number of bits assigned to the timing data, a time interval between the sample points is represented by the sum of a plurality of timing data values.
In another embodiment of the present invention, on a compression side, a digital interpolation value for the discrete data is computed by synthesizing digital data, which has a basic waveform corresponding to values of n pieces of inputted discrete data, by oversampling and a moving average operation or a convoluting operation, and a pair of the amplitude data and timing data is obtained as compressed data based on the oversampled data.
Since the present invention is realized by the above techniques, when a signal is compressed on a time base, it is possible to perform time/frequency conversion and carry out operations on the time base without necessity for an operation on a frequency axis. Also, when data compressed thus is expanded as well, the operation can be performed on the time base. Therefore, it is possible to simplify the compressing and expanding operations, shorten a processing time, and realize a simple configuration for the operations. Further, when compressed data is transmitted from the compression side and is reproduced on the expansion side as well, compressed data inputted to the expansion side can be sequentially processed and reproduced by a simple interpolating operation on a time base, thereby achieving real-time operations.
Additionally, according to the present invention, a data length can be reduced by several bits per word by performing a rounding operation of a lower-order bit on unsigned digital data whose values are all made positive by adding an offset value. Thus, it is possible to largely cut an amount of data. Moreover, it is possible to obtain only data on the sample points as compressed data from data compressed by rounding for each word, thereby achieving a high compressibility. At this moment, digital data to be subjected to a rounding operation is concentrated on some of all data regions represented by the number of bits, but the digital data appears less frequently on a data region around an end (a data region of lower-order bits to be cut). Therefore, even when lower-order bits are reduced from such data, it is possible to suppress degradation in quality of the data reproduced on the expansion side.
According to another characteristic of the present invention, on a compression side, a nonlinearizing operation is performed for shifting the relationship of an input data value and an output data value from a one-to-one relationship before a rounding operation. Thus, in a data region where data is used most frequently, it is possible to obtain the same effect as a rounding operation using a value smaller than an actual value of the rounding operation, thereby reducing the influence of the rounding operation on reproduced data. Hence, it is possible to further suppress degradation in quality of reproduced data.
According to another characteristic of the present invention, when a time interval between sample points exceeds a value represented by the number of bits assigned to timing data, by representing a time interval between the sample points by the sum of a plurality of timing data values, it is possible to assign to timing data a sufficiently small number of bits required for many cases without assigning a large number of bits to timing data in a large timing interval appearing exceptionally, thereby improving a compressibility.
According to another characteristic of the present invention, continuous interpolation values can be obtained for original discrete data merely by performing oversampling and a moving average operation or a convoluting operation on digital data, which has a basic waveform corresponding to inputted discrete data. When an interpolation value is computed, only a limited number of discrete data values need to be considered. Thus, a censoring error does not occur, an accurate interpolation value can be obtained, and reproducibility of original data before compression can be improved regarding data reproduced on the expansion side when a compressing operation is performed using the interpolation value.
As described above, according to the present invention, it is possible to provide a new compressing and expanding method for realizing both of a high compressibility and improved quality of reproduced data with a simple configuration and a shorter compressing and expanding time.